<?php 
    $env = Jnd_App::getEnvironnement();
    $acl = Zend_Registry::get('acl');
    $request = Zend_Controller_Front::getInstance()->getRequest();
    $pages = Back_Model_Pages::recuperationPagesDansMenu();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="description" content="Site du club de badminton de la ville de Lomme.">
<meta name="keywords" content="badminton, lomme, club, osml">
<title>O.S.M.L. Badminton <?php echo ($this->titrePage != "" ? " - " . $this->titrePage : "")?></title>
<link rel="icon" type="image/gif" href="<?php echo $this->baseUrl("/favicon.gif")?>" />
<link href='<?php echo $this->baseUrl("/favicon.ico")?>' rel='icon' type='image/x-icon'/>
<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl('css/style.css');?>">
<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl('/css/jQuery/cupertino/jquery-ui-1.8.21.custom.css');?>">
<script type="text/javascript" src="<?php echo $this->baseUrl('js/modernizr-1.5.min.js')?>"></script>
</head>
<body>
	<div id="main">
		<header>
            <div style="float: left;"><div id="logoClub"><img src="<?php echo $this->baseUrl("/images/osml_bad_petit.png")?>" alt="logo" style="float: left;" /></div></div>
		    <div id="logo">
				<div id="logo_text">
					<!-- class="logo_colour", allows you to change the colour of the text -->
					<h1>
						<a href="/">O.S.M.L.<span class="logo_colour"> Badminton</span></a>
					</h1>
					<h2><?php echo __("Le club de badminton de Lomme")?></h2>
				</div>
			</div>
			<nav>
				<ul class="sf-menu" id="nav">
					<li class="<?php echo ($request->getModuleName() == "front" && $request->getControllerName() == "accueil" ? "selected" : ""); ?>"><a href="/"><?php echo __('Accueil')?></a></li>
					<li class="<?php echo ($request->getModuleName() == "front" && $request->getControllerName() == "competitions" ? "selected" : ""); ?>"><a href="/"><?php echo __('Compétitions')?></a>
					<?php echo $this->generationmenu(Back_Model_Competitions::competitionsParNiveau(0)); ?>
                    </li>
					<?php foreach( $pages as $page) : ?>
					<li class="<?php echo ($request->getModuleName() == "front" && $request->getControllerName() == "pages" && $request->getParam('id') == $page->getId() ? "selected" : ""); ?>"><a href="<?php echo $this->smartUrl("voir", "pages", "front", array("id" => $page->getId()))?>"><?php echo $page->getTitre()?></a>
					<?php endforeach;?>
					<li class="<?php echo ($request->getModuleName() == "front" && $request->getControllerName() == "contact" ? "selected" : ""); ?>"><a href="<?php echo $this->smartUrl("index", "contact", "front")?>"><?php echo __("Contact")?></a></li>
					<?php if ( $acl->isAllowedArray($env->getRoles(), "back.index")) : ?>
					<li><a href="<?php echo $this->smartUrl("index", "index", "back")?>" target="_blank"><?php echo __("Administration")?></a></li>
					<?php endif; ?>
				</ul>
			</nav>
		</header>
		<div id="site_content"> 
			<ul id="images">
				<li><img src="<?php echo $this->baseUrl('images/1.jpg');?>" width="600" height="300" alt="photo_one"></li>
				<li><img src="<?php echo $this->baseUrl('images/2.jpg');?>" width="600" height="300" alt="photo_two"></li>
				<li><img src="<?php echo $this->baseUrl('images/3.jpg');?>" width="600" height="300" alt="photo_three"></li>
				<li><img src="<?php echo $this->baseUrl('images/4.jpg');?>" width="600" height="300" alt="photo_four"></li>
				<li><img src="<?php echo $this->baseUrl('images/5.jpg');?>" width="600" height="300" alt="photo_five"></li>
				<li><img src="<?php echo $this->baseUrl('images/6.jpg');?>"	width="600" height="300" alt="photo_six"></li>
				<li><img src="<?php echo $this->baseUrl('images/7.jpg');?>"	width="600" height="300" alt="photo_seven"></li>
			</ul>
			<?php if ($this->afficherSidebar) : ?>
			<div id="sidebar_container">
			    <div class="sidebar">
					<?php if( $this->connecte === FALSE ) : ?>
					<h2><?php echo __("Connexion")?></h2>
					<p class="italic_style"><?php echo __("Me connecter à mon compte")?></p>
					<?php echo $this->formConnect; ?>
					<img src="<?php echo $this->baseUrl("/images/enregistrer.png")?>" alt="" id="boutonEnregistrer" style="float: right;"/><br />
					<a href="<?php echo $this->smartUrl("jaioublie", "accueil", "front")?>"><?php echo __("J'ai oublié mon mot de passe")?></a>
					<?php else : ?>
                    <h2>Mon compte (<a href="<?php echo $this->smartUrl("deconnexion", "accueil", "front")?>"><?php echo __('Se déconnecter');?></a>)</h2>
                	<p class="italic_style"><?php echo $env->prenom . " " . $env->nom ?> <img src="<?php echo $this->baseUrl("/images/SettingsButton.png")?>" alt="" width="16" id="editionPreference" /></p>
                    <?php endif; ?>
				</div>
				<div class="sidebar">
					<h3><?php echo __("news")?></h3>
					<h4><?php echo $this->rss_titre?></h4>
					<h5><?php echo $this->rss_date?></h5>
					<p>
						<?php echo $this->rss_message?><br />
						Source : <a href="<?php echo $this->rss_permalink?>" target="_blank"><?php echo __('lire')?></a>
					</p>
				</div>
				<div class="sidebar">
					<h3><?php echo __("Liens utiles")?></h3>
					<ul>
					    <?php foreach( $this->liens as $lien) : ?>
						<li><a href="<?php echo $lien->getUrl()?>" target="_blank"><?php echo $lien->getNom()?></a></li>
						<?php endforeach;?>
					</ul>
				</div>
				<div class="sidebar">
				<img src="/images/logo_EFB_2.jpg" alt="logo_efs_2_etoiles">
				</div>
			</div>
			<?php endif; ?>
			<div class="content <?php echo ($this->afficherSidebar ? "" : "full" )?>">
			    <?php $this->messenger();?>
				<?php echo $this->layout()->content; ?>
			</div>
		</div>
		<footer>
			<p>
				 OmniSports Municipal Lommois section Badminton - 2012<br />
				 Club labelisé école française de badminton 2 étoiles par la FFBAD
			</p>
		</footer>
	</div>
		<?php
	    echo $this->render("actions.phtml");
		echo $this->headLink();
		echo $this->jQuery()
			->uiEnable()
			->setLocalPath('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js')
			->setUiLocalPath('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js')
            ->addJavascriptFile($this->baseUrl('/js/multiselect/ui.multiselect.js'))
            ->addJavascriptFile($this->baseUrl('/js/admin/jquery.pngFix.pack.js'))
        	->addJavascriptFile('/js/jquery.sooperfish.js')
        	->addJavascriptFile('/js/jquery.easing-sooper.js');
	?>
<script type="text/javascript" src="<?php echo $this->baseUrl('js/jquery.kwicks-1.5.1.js');?>"></script>
</body>
</html>
